﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace Vit.DynamicFormModule.Areas.Form.Models
{
    public class FormField
    {
        [Key]
        [StringLength(50)]
        [Required]
        [Column(Order = 1)]
        public string FormName { get; set; }
        [Key]
        [StringLength(50)]
        [Required]
        [Column(Order = 2)]
        public string FieldName { get; set; }
        [StringLength(50)]
        [Required]
        public string Caption { get; set; }
        [StringLength(500)]
        public string Desription { get; set; }
        [StringLength(500)]
        public string DefaultValue { get; set; }
        [StringLength(50)]
        public string Editor { get; set; }
        public bool Required { get; set; }
        [StringLength(500)]
        public string RegexPattern { get; set; }
        [StringLength(50)]
        public string DataSourceName { get; set; }

        public virtual DynamicForm Form { get; set; }
    }
}